<%@ include file="/view/template/header.jsp"%>

	<div id="content">
    	<%@ include file="/view/ehr/ehr_common.jsp"%>
        		<div class="right-content">
			<div class="box">
				<h1>Merge Two Patients</h1>
<s:form action="search_patient_results_form" method="post">
<div class="con-part"><span><s:label key="label.merge.patient1" cssClass="label_text"></s:label></span> 
				<s:textfield name="patientId1" value="%{#parameters['patient_id1'][0]}" class="input-text"></s:textfield> </div>
				<%out.println(request.getParameter("Key"));%>
<%-- <s:radio list="{1,2,3,4}" name="selectedIndex" key="selectedIndex"  cssClass="side_radio"></s:radio> --%>
<s:if test="action.patientDetailsList.size > 0">

<s:iterator value="action.patientDetailsList">
<%-- <s:property="patient.patientId"/> --%>
    <div class="sub_box">
    	  <div class="left_box">
    	 
        	<s:radio list="{patient.patientId}" key="selectedIndex"  cssClass="side_radio"></s:radio>
        </div>
        <div class="con-part"><span><s:label key="label.patient.patientId" cssClass="label_text">  </s:label></span>
                <s:textfield name="patient.patientId" key="patient.patientId" class="input-text" readonly="true"></s:textfield>
                </div>             
                <div class="con-part"><span><s:label key="label.patient.givenName" cssClass="label_text">  </s:label></span>
                <s:textfield name="patient.givenName" key="patient.givenName" class="input-text" readonly="true"></s:textfield>
                </div>
                <div class="con-part"><span><s:label key="label.patient.familyName" cssClass="label_text">  </s:label></span>
                <s:textfield name="patient.familyName" key="patient.familyName" class="input-text" readonly="true"></s:textfield>
                </div>
                <div class="con-part"><span><s:label key="label.patient.nic" cssClass="label_text">  </s:label></span>
                <s:textfield name="patient.nicNo" key="patient.nicNo" class="input-text" readonly="true"></s:textfield>
                <!-- <input name="nic" type="text" id="nic" class="input-text" value="8633530V" disabled="disabled"> -->
                <div class="con-part"><span><s:label key="label.patient.dob" cssClass="label_text">  </s:label></span>
                <s:textfield name="patient.birthTime" key="patient.birthTime" class="input-text" readonly="true"></s:textfield>
                </div>
                </div>
        	 
   <div class="con-part">
									<s:url action="more_patient_details" var="more_patient_details_action">
										<s:param name="patient_id2" value="%{patient.patientId}"/>
									</s:url>
									<a href="${more_patient_details_action}" class="green"><s:text name="label.viewMorePatientDetails"/></a>
								</div>
								</div>
       	 </s:iterator>
        	 </s:if>
<div class="button_bar2">
					
						<span>
						<s:url action="merge_patient_form" var="merge_patient_form_action">
					<s:param name="patient_id1" value="patientId1"/>
					<s:param name="patient_id2" value="selectedIndex"/>
				</s:url>			
		
				<a href="${merge_patient_form_action}" class="green"><s:text name="merge.merge_button"/></a>
				</span>
						
					</div>
</s:form>
			</div>
		</div>
    </div>

	<%@ include file="/view/template/footer.jsp"%>